package com.dxiang.demo.common;

import java.nio.charset.Charset;

public class Constants
{


	public final static int REDIS_DB_TOKEN = 2;

	public final static int REDIS_DB_REGISTER = 1;

	/**
	 * 修改类型
	 */
	public final static int COMMON_TYPE_UPDATE = 1;

	/**
	 * 语言类型
	 */
	public final static int COMMON_TYPE_LANGERAGE = 2;

	/**
	 * 游戏状态
	 */
	public final static int COMMON_TYPE_STATUS = 3;

	/**
	 * 游戏类型
	 */
	public final static int COMMON_TYPE_GAME = 4;

	/**
	 * 状态有效
	 */
	public static final int STATUS_VALID = 0;

	/**
	 * 状态无效
	 */
	public static final int STATUS_INVALID = 1;

	public static final Integer DEFAULT_LEVEL = 0;

	public static final Charset DEFAULT_CHARSET = Charset.forName("UTF-8");

	public static final String DEFAULT_ENCODING = "UTF-8";

	public static final String XAUTH_TOKEN_HEADER_NAME = "XE-TOKEN";

	public static final String M5_SAL = "jwsn7_";

	public static final String SI_SAL = "2^5&FF";

	public static final String HEADER = "rq_header";
	public static final String CLIENT = "rq_client";
	public static final String CHANNEL = "rq_channel";

	public final static int TOKEN_EXPIRES_DEFAULT = 7;
	public final static int TOKEN_TEMP_EXPIRES_DEFAULT = 1;

	public static final int REG_NOT_PERFECT = 0;
	public static final int REG_PERFECT = 1;

	public static final int ACCOUNT_UNLOCKED = 0;
	public static final int ACCOUNT_LOCKED = 1;


	public static Boolean isTestMode() {
		return Boolean.valueOf(Global.getConfig("isTestMode", "false"));
	}

	public static Integer getPageSize() {
		return Integer.valueOf(Global.getConfig("pageSize", "10"));
	}

}
